﻿// (c) Copyright 2013 Mike Riedel.
// This source is subject to the Microsoft Public License (Ms-PL).
// All other rights reserved.

namespace FreshMeat.Storage
{
   /// <summary>
   /// Defines a basic store for a specified data type.
   /// </summary>
   /// <typeparam name="TId"></typeparam>
   /// <typeparam name="TData"></typeparam>
   public interface IStore<TId, TData>
   {
      /// <summary>
      /// Creates a context through which operations are performed against this store.
      /// Operations made through a context are isolated from operations made through other contexts.
      /// Contexts should be used and disposed as quickly as possible.
      /// </summary>
      /// <returns></returns>
      IStoreContext<TId, TData> CreateContext();
   }
}